home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / OpenLinux 2.3 CD.iso / live / usr / share / vim / syntax / uil.vim < prev    next >
Encoding:
Text File  |  1999-08-10  |  2.4 KB  |  68 lines

  1. " Vim syntax file
  2. " Language:    Motif UIL (User Interface Language)
  3. " Maintainer:    Thomas Koehler <jean-luc@picard.franken.de>
  4. " Last change:    1998 February 17
  5.  
  6. syn clear
  7.  
  8. " A bunch of useful keywords
  9. syn keyword uilType    arguments    callbacks    color
  10. syn keyword uilType    compound_string    controls    end
  11. syn keyword uilType    exported    file        include
  12. syn keyword uilType    module        object        procedure
  13. syn keyword uilType    user_defined    xbitmapfile
  14.  
  15. syn keyword uilTodo contained    TODO
  16.  
  17. " String and Character contstants
  18. " Highlight special characters (those which have a backslash) differently
  19. syn match   uilSpecial contained "\\\d\d\d\|\\."
  20. syn region  uilString        start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=uilSpecial
  21. syn match   uilCharacter    "'[^\\]'"
  22. syn region  uilString        start=+'+  skip=+\\\\\|\\"+  end=+'+  contains=uilSpecial
  23. syn match   uilSpecialCharacter    "'\\.'"
  24. syn match   uilSpecialStatement    "Xm[^ =(){}]*"
  25. syn match   uilSpecialFunction    "MrmNcreateCallback"
  26. syn match   uilRessource    "XmN[^ =(){}]*"
  27.  
  28. syn match  uilNumber        "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>"
  29. syn match  uilNumber        "0[xX][0-9a-fA-F]\+\>"
  30.  
  31. syn region uilComment        start="/\*"  end="\*/" contains=uilTodo
  32. syn match  uilComment        "!.*" contains=uilTodo
  33. syn match  uilCommentError    "\*/"
  34.  
  35. syn region uilPreCondit        start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)"  skip="\\$"  end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError
  36. syn match  uilIncluded contained "<[^>]*>"
  37. syn match  uilInclude        "^#\s*include\s\+." contains=uilString,uilIncluded
  38. syn match  uilLineSkip        "\\$"
  39. syn region uilDefine        start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError
  40.  
  41. syn sync ccomment uilComment
  42.  
  43. if !exists("did_uil_syntax_inits")
  44.   let did_uil_syntax_inits = 1
  45.   " The default methods for highlighting.  Can be overridden later
  46.   hi link uilCharacter        uilString
  47.   hi link uilSpecialCharacter    uilSpecial
  48.   hi link uilNumber        uilString
  49.   hi link uilCommentError    uilError
  50.   hi link uilInclude        uilPreCondit
  51.   hi link uilDefine        uilPreCondit
  52.   hi link uilIncluded        uilString
  53.   hi link uilSpecialFunction    uilRessource
  54.   hi link uilRessource        Identifier
  55.   hi link uilSpecialStatement    Keyword
  56.   hi link uilError        Error
  57.   hi link uilPreCondit        PreCondit
  58.   hi link uilType        Type
  59.   hi link uilString        String
  60.   hi link uilComment        Comment
  61.   hi link uilSpecial        Special
  62.   hi link uilTodo        Todo
  63. endif
  64.  
  65. let b:current_syntax = "uil"
  66.  
  67. " vim: ts=8
  68.